package com.reverie.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author Rui.Zhou
 * @since 2024-02-03
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("mh_goods")
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "goods_id", type = IdType.AUTO)
    private Integer goodsId;

    private Integer catId;

    private String goodsSn;

    private String goodsName;

    private String goodsNameStyle;

    private Integer clickCount;

    private Integer brandId;

    private String providerName;

    private Integer goodsNumber;

    private BigDecimal goodsWeight;

    private BigDecimal marketPrice;

    private BigDecimal shopPrice;

    private BigDecimal promotePrice;

    private Integer promoteStartDate;

    private Integer promoteEndDate;

    private String warnNumber;

    private String keywords;

    private String goodsBrief;

    private String goodsDesc;

    private String goodsThumb;

    private String goodsImg;

    private String originalImg;

    private Boolean isReal;

    private String extensionCode;

    private Boolean isOnSale;

    private Boolean isAloneSale;

    private Boolean isShipping;

    private Integer integral;

    private Integer addTime;

    private Integer sortOrder;

    private Boolean isDelete;

    private Boolean isBest;

    private Boolean isNew;

    private Boolean isHot;

    private Boolean isPromote;

    private Boolean bonusTypeId;

    private Integer lastUpdate;

    private Integer goodsType;

    private String sellerNote;

    private Integer giveIntegral;

    private Integer rankIntegral;

    private Short suppliersId;

    private Boolean isCheck;

    private String sapName;

    private Integer onsaleTime;

    private String belongTo;

    private String exLabel1;

    private String exField1;

    private String exLabel2;

    private String exField2;

    private String exLabel3;

    private String exField3;

    private Integer parentId;

    private String exGoods;

    private String spName;

    private Integer attrId;

    /**
     * 标识下午茶是否在销售
     */
    private Boolean isSales;

    @TableField(exist = false)
    private List<GoodsAttr> goodAttrList;
    @TableField(exist = false)
    private List<GoodsGallery> goodGalleries;
    @TableField(exist = false)
    private Boolean disabled = false;

    public Boolean getDisabled() {
        return !this.isOnSale;
    }
}
